<% content_for :sitemap do %>
  <span class="current"><%= t("cpane.menu.nodes")%></span>
<% end %>
<h1>Listing nodes</h1>

<table class="grid">
  <tr class="head">
    <td class="first">ID</td>
    <td>Name</td>
    <td>Section</td>
    <td>Sort</td>
    <td>Topics count</td>
    <td></td>
  </tr>

<% @nodes.each do |node| %>
  <tr>
    <td class="first"><%= node.id %></td>
    <td><%= node.name %></td>
    <td><%= node.section.name %></td>
    <td><%= node.sort %></td>
    <td><%= node.topics_count %></td>
    <td><%= link_to 'Edit', edit_cpanel_node_path(node) %>
    <%= link_to 'Destroy', cpanel_node_path(node), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Node', new_cpanel_node_path %>
